<template>
	<view class="weight-ratio">
		<view class="weight-echart">
			<view class="weight-bmi">
				<view>
					<text><text class="tap">{{data==null?"-":data.highter}}</text>KG</text>
					<text>最高体重</text>
				</view>
				<view>
					<text><text class="tap">{{data==null?"-":data.lower}}</text>KG</text>
					<text>最低体重</text>
				</view>
			</view>
			<view class="echart">
				<weightRatioLineVue></weightRatioLineVue>
			</view>
		</view>
		<view class="weight-target">
			<view>
				<image src="/static/index/target.png"></image>
				<text>指标变化</text>
			</view>
			<view>
				<text><text class="tap">{{data==null?"-":"-"+data.reduceWeight}}</text>KG</text>
				<text class="weight-text">体重</text>
			</view>
		</view>
		</view>
</template>

<script setup>
import { reactive } from 'vue';
import weightRatioLineVue from '../../../../ucharts/weight/weightRatioLine.vue';
	let data=reactive({
		highter:50,
		lower:44,
		reduceWeight:4
	})

</script>

<style scoped>
	.weight-ratio {
		paddingr: 0rpx 10rpx 0rpx 10rpx;
		padding-top:250rpx;
		height: 100vh;
		display: flex;
		flex-direction: column;
		flex-wrap: nowrap;
		justify-content: flex-start;
	}
	text {
		margin: 8rpx 0rpx 0rpx 20rpx;
	}
	.weight-ratio>view {
		height:70%;
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		margin: 10rpx 20rpx;
		padding-top: 20rpx;
		box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
		border-radius: 25rpx;
	}
	
	.weight-ratio>view:nth-child(2){
		height:30%;
	}
	image {
		margin-left: 20rpx;
		width: 50rpx;
		height: 50rpx;
	}
	/* echart图 */
	.echart{
		width: 100%;
		height: 80%;
	}
	.tap {
		font-size: 44rpx;
	}
	.weight-bmi{
		width: 100%;
		height:20%;
		display: flex;
		flex-direction: row;
		flex-wrap: nowrap;
		justify-content: space-around;
	}
	.weight-bmi view{
		width:50%;
		text-align: center;
		border-bottom: 2rpx solid #cccccc;
		display: flex;
		flex-direction: column;
		flex-wrap: nowrap;
		justify-content: flex-start;
	}
	.weight-bmi>view:nth-child(1){
		border-right:4rpx dotted #d1d1d1;
	}
	/* 指标部分 */
	.weight-target>view:nth-child(1){
		width: 100%;
		height: 30%;
		display: flex;
		flex-direction: row;
		flex-wrap: nowrap;
		justify-content: flex-start;
		border-bottom: 2rpx solid #cccccc;
	}
	.weight-target>view:nth-child(2){
		width: 100%;
		height: 70%;
		display: flex;
		flex-direction: column;
		flex-wrap: nowrap;
		justify-content: flex-start;
	}
	.weight-text{
		margin-left:45rpx;
	}
</style>